package cn.akira.test.domain.strategy;

import cn.akira.domain.strategy.service.armory.IStrategyArmory;
import cn.akira.domain.strategy.service.armory.IStrategyDispatch;
import lombok.extern.slf4j.Slf4j;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import javax.annotation.Resource;

/**
 * @author fjl95
 * @date 2025/5/11
 * @description
 */
@Slf4j
@RunWith(SpringRunner.class)
@SpringBootTest
public class StrategyArmoryDispatchTest {

    @Resource
    private IStrategyArmory strategyArmory;

    @Resource
    private IStrategyDispatch strategyDispatch;

    @Test
    public void test() {
        strategyArmory.assembleLotteryStrategy((Long)100006L);
//        Integer award12 = strategyDispatch.getRandomAwardId(100001L);
//        Integer award13 = strategyDispatch.getRandomAwardId(100001L);
//        log.info("award12:{}", award12);
//        log.info("award13:{}", award13);
    }
    @Test
    public void test1() {
        int a = strategyDispatch.getRandomAwardId(100003L);
        log.info("带权重抽签1:{}",strategyDispatch.getRandomAwardId(100001L,"4000"));
        log.info("带权重抽签2:{}",strategyDispatch.getRandomAwardId(100001L,"4000"));
        log.info("带权重抽签3:{}",strategyDispatch.getRandomAwardId(100001L,"4000"));
        log.info("带权重抽签4:{}",strategyDispatch.getRandomAwardId(100001L,"4000"));
    }

}
